package com.lzq.SingletonPattern;
/*
静态内部类，线程安全，延迟初始化
 */
public class Singleton_Inner {
    //私有构造函数
    private Singleton_Inner(){

    }
    //第一次调用时创建
    public static Singleton_Inner getInstance(){
        return Inner.INSTANCE;
    }
    //创建静态内部类
    private static class Inner{
        private static final Singleton_Inner INSTANCE = new Singleton_Inner();
    }
}
